home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / Millenium 24319892001.psc / Main.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-08-09  |  39.0 KB  |  1,177 lines

  1. VERSION 5.00
  2. Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
  3. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  4. Object = "{0BA686C6-F7D3-101A-993E-0000C0EF6F5E}#1.0#0"; "THREED32.OCX"
  5. Object = "{D27CDB6B-AE6D-11CF-96B8-444553540000}#1.0#0"; "SWFLASH.OCX"
  6. Begin VB.Form Main 
  7.    BackColor       =   &H80000004&
  8.    BorderStyle     =   1  'Fixed Single
  9.    Caption         =   "Millenium CD Player"
  10.    ClientHeight    =   4605
  11.    ClientLeft      =   150
  12.    ClientTop       =   720
  13.    ClientWidth     =   6735
  14.    DrawWidth       =   4
  15.    Icon            =   "Main.frx":0000
  16.    LinkTopic       =   "Form4"
  17.    MaxButton       =   0   'False
  18.    ScaleHeight     =   4605
  19.    ScaleWidth      =   6735
  20.    StartUpPosition =   3  'Windows Default
  21.    Begin VB.Frame help 
  22.       Caption         =   "Opcional"
  23.       BeginProperty Font 
  24.          Name            =   "MS Sans Serif"
  25.          Size            =   8.25
  26.          Charset         =   0
  27.          Weight          =   700
  28.          Underline       =   0   'False
  29.          Italic          =   0   'False
  30.          Strikethrough   =   0   'False
  31.       EndProperty
  32.       Height          =   1935
  33.       Left            =   0
  34.       TabIndex        =   46
  35.       Top             =   2640
  36.       Width           =   2870
  37.       Begin ShockwaveFlashObjectsCtl.ShockwaveFlash ShockwaveFlash1 
  38.          Height          =   2175
  39.          Left            =   0
  40.          TabIndex        =   47
  41.          Top             =   -240
  42.          Width           =   2895
  43.          _cx             =   4199410
  44.          _cy             =   4198140
  45.          Movie           =   "d:\vb\Millenium Player Pro\Millenium Player Pro2\walk.swf"
  46.          Src             =   "d:\vb\Millenium Player Pro\Millenium Player Pro2\walk.swf"
  47.          WMode           =   "Window"
  48.          Play            =   0   'False
  49.          Loop            =   -1  'True
  50.          Quality         =   "High"
  51.          SAlign          =   ""
  52.          Menu            =   -1  'True
  53.          Base            =   ""
  54.          Scale           =   "ShowAll"
  55.          DeviceFont      =   0   'False
  56.          EmbedMovie      =   0   'False
  57.          BGColor         =   ""
  58.          SWRemote        =   ""
  59.       End
  60.    End
  61.    Begin VB.CommandButton Command2 
  62.       BackColor       =   &H00FFFF00&
  63.       Caption         =   "MIXER"
  64.       Height          =   210
  65.       Left            =   3720
  66.       Style           =   1  'Graphical
  67.       TabIndex        =   0
  68.       Top             =   3000
  69.       Visible         =   0   'False
  70.       Width           =   195
  71.    End
  72.    Begin VB.Frame Frame6 
  73.       Caption         =   "Microfone"
  74.       Height          =   2325
  75.       Left            =   4680
  76.       TabIndex        =   15
  77.       Top             =   0
  78.       Width           =   975
  79.       Begin VB.TextBox Text2 
  80.          Alignment       =   2  'Center
  81.          BackColor       =   &H80000007&
  82.          ForeColor       =   &H0000FFFF&
  83.          Height          =   285
  84.          Left            =   90
  85.          TabIndex        =   22
  86.          TabStop         =   0   'False
  87.          Text            =   "32768"
  88.          Top             =   210
  89.          Width           =   795
  90.       End
  91.       Begin VB.CheckBox Check4 
  92.          BackColor       =   &H8000000B&
  93.          Height          =   210
  94.          Left            =   90
  95.          TabIndex        =   20
  96.          Top             =   1800
  97.          Width           =   210
  98.       End
  99.       Begin VB.PictureBox Picture4 
  100.          Height          =   330
  101.          Left            =   375
  102.          ScaleHeight     =   270
  103.          ScaleWidth      =   180
  104.          TabIndex        =   17
  105.          ToolTipText     =   "Mute"
  106.          Top             =   1680
  107.          Width           =   240
  108.          Begin VB.OptionButton Option8 
  109.             BackColor       =   &H00808080&
  110.             Height          =   150
  111.             Left            =   0
  112.             Style           =   1  'Graphical
  113.             TabIndex        =   19
  114.             ToolTipText     =   "Unmute"
  115.             Top             =   0
  116.             Value           =   -1  'True
  117.             Width           =   195
  118.          End
  119.          Begin VB.OptionButton Option7 
  120.             BackColor       =   &H00400000&
  121.             Height          =   150
  122.             Left            =   0
  123.             Style           =   1  'Graphical
  124.             TabIndex        =   18
  125.             ToolTipText     =   "Mute"
  126.             Top             =   135
  127.             Width           =   195
  128.          End
  129.       End
  130.       Begin ComctlLib.Slider Slider2 
  131.          Height          =   1230
  132.          Left            =   0
  133.          TabIndex        =   23
  134.          Top             =   525
  135.          Width           =   615
  136.          _ExtentX        =   1085
  137.          _ExtentY        =   2170
  138.          _Version        =   327682
  139.          Orientation     =   1
  140.          LargeChange     =   200
  141.          Max             =   65535
  142.          SelStart        =   32768
  143.          TickStyle       =   2
  144.          TickFrequency   =   3265
  145.          Value           =   32768
  146.       End
  147.    End
  148.    Begin VB.Frame Frame4 
  149.       Caption         =   "Cd Vol"
  150.       Height          =   2325
  151.       Left            =   3960
  152.       TabIndex        =   8
  153.       Top             =   0
  154.       Width           =   735
  155.       Begin VB.PictureBox Picture7 
  156.          Height          =   330
  157.          Left            =   390
  158.          ScaleHeight     =   270
  159.          ScaleWidth      =   180
  160.          TabIndex        =   12
  161.          ToolTipText     =   "Mute"
  162.          Top             =   1680
  163.          Width           =   240
  164.          Begin VB.OptionButton Option14 
  165.             BackColor       =   &H00808080&
  166.             Height          =   150
  167.             Left            =   0
  168.             Style           =   1  'Graphical
  169.             TabIndex        =   14
  170.             ToolTipText     =   "Unmute"
  171.             Top             =   0
  172.             Value           =   -1  'True
  173.             Width           =   195
  174.          End
  175.          Begin VB.OptionButton Option13 
  176.             BackColor       =   &H00400000&
  177.             Height          =   150
  178.             Left            =   0
  179.             Style           =   1  'Graphical
  180.             TabIndex        =   13
  181.             ToolTipText     =   "Mute"
  182.             Top             =   135
  183.             Width           =   195
  184.          End
  185.       End
  186.       Begin VB.CheckBox Check2 
  187.          BackColor       =   &H8000000B&
  188.          Height          =   210
  189.          Left            =   90
  190.          TabIndex        =   11
  191.          Top             =   1800
  192.          Width           =   210
  193.       End
  194.       Begin VB.TextBox Text1 
  195.          Alignment       =   2  'Center
  196.          BackColor       =   &H80000007&
  197.          ForeColor       =   &H0000FFFF&
  198.          Height          =   285
  199.          Left            =   90
  200.          TabIndex        =   9
  201.          TabStop         =   0   'False
  202.          Text            =   "32768"
  203.          Top             =   210
  204.          Width           =   555
  205.       End
  206.       Begin ComctlLib.Slider Slider1 
  207.          Height          =   1230
  208.          Left            =   30
  209.          TabIndex        =   10
  210.          Top             =   525
  211.          Width           =   600
  212.          _ExtentX        =   1058
  213.          _ExtentY        =   2170
  214.          _Version        =   327682
  215.          Orientation     =   1
  216.          LargeChange     =   200
  217.          Max             =   65535
  218.          SelStart        =   32768
  219.          TickStyle       =   2
  220.          TickFrequency   =   3265
  221.          Value           =   32768
  222.       End
  223.    End
  224.    Begin VB.Frame Frame3 
  225.       Caption         =   "Volume"
  226.       Height          =   2325
  227.       Left            =   3120
  228.       TabIndex        =   1
  229.       Top             =   0
  230.       Width           =   825
  231.       Begin VB.CheckBox Check1 
  232.          BackColor       =   &H8000000B&
  233.          Height          =   210
  234.          Left            =   90
  235.          TabIndex        =   7
  236.          Top             =   1800
  237.          Width           =   240
  238.       End
  239.       Begin VB.PictureBox Picture1 
  240.          Height          =   330
  241.          Left            =   390
  242.          ScaleHeight     =   270
  243.          ScaleWidth      =   180
  244.          TabIndex        =   4
  245.          ToolTipText     =   "Mute"
  246.          Top             =   1680
  247.          Width           =   240
  248.          Begin VB.OptionButton Option1 
  249.             BackColor       =   &H00808080&
  250.             Height          =   150
  251.             Left            =   0
  252.             Style           =   1  'Graphical
  253.             TabIndex        =   6
  254.             ToolTipText     =   "Unmute"
  255.             Top             =   0
  256.             Value           =   -1  'True
  257.             Width           =   195
  258.          End
  259.          Begin VB.OptionButton Option2 
  260.             BackColor       =   &H00400000&
  261.             Height          =   150
  262.             Left            =   0
  263.             Style           =   1  'Graphical
  264.             TabIndex        =   5
  265.             ToolTipText     =   "Mute"
  266.             Top             =   135
  267.             Width           =   195
  268.          End
  269.       End
  270.       Begin VB.TextBox txtMasterVolume 
  271.          Alignment       =   2  'Center
  272.          BackColor       =   &H80000007&
  273.          ForeColor       =   &H0000FFFF&
  274.          Height          =   285
  275.          Left            =   90
  276.          TabIndex        =   2
  277.          TabStop         =   0   'False
  278.          Text            =   "32768"
  279.          Top             =   210
  280.          Width           =   675
  281.       End
  282.       Begin ComctlLib.Slider sliderMasterVolume 
  283.          Height          =   1230
  284.          Left            =   30
  285.          TabIndex        =   3
  286.          Top             =   510
  287.          Width           =   600
  288.          _ExtentX        =   1058
  289.          _ExtentY        =   2170
  290.          _Version        =   327682
  291.          Orientation     =   1
  292.          LargeChange     =   200
  293.          Max             =   65535
  294.          SelStart        =   32768
  295.          TickStyle       =   2
  296.          TickFrequency   =   3265
  297.          Value           =   32768
  298.       End
  299.       Begin MSComctlLib.Slider Slider19 
  300.          Height          =   225
  301.          Left            =   60
  302.          TabIndex        =   34
  303.          Top             =   2070
  304.          Width           =   600
  305.          _ExtentX        =   1058
  306.          _ExtentY        =   397
  307.          _Version        =   393216
  308.          LargeChange     =   10
  309.          SmallChange     =   5
  310.          Min             =   -32767
  311.          Max             =   32767
  312.          TickStyle       =   3
  313.       End
  314.    End
  315.    Begin VB.Timer Timer1 
  316.       Enabled         =   0   'False
  317.       Interval        =   1000
  318.       Left            =   6240
  319.       Top             =   2880
  320.    End
  321.    Begin VB.Frame Frame13 
  322.       BackColor       =   &H8000000A&
  323.       Caption         =   "Control"
  324.       Height          =   2325
  325.       Left            =   5760
  326.       TabIndex        =   16
  327.       Top             =   0
  328.       Width           =   855
  329.       Begin VB.CheckBox Check11 
  330.          BackColor       =   &H8000000B&
  331.          Height          =   210
  332.          Left            =   90
  333.          TabIndex        =   21
  334.          ToolTipText     =   "Links all selected faders to SBM fader"
  335.          Top             =   2040
  336.          Width           =   225
  337.       End
  338.       Begin ComctlLib.Slider Slider6 
  339.          Height          =   1740
  340.          Left            =   120
  341.          TabIndex        =   24
  342.          Top             =   240
  343.          Width           =   615
  344.          _ExtentX        =   1085
  345.          _ExtentY        =   3069
  346.          _Version        =   327682
  347.          Orientation     =   1
  348.          LargeChange     =   200
  349.          Max             =   65535
  350.          SelStart        =   32768
  351.          TickStyle       =   1
  352.          TickFrequency   =   3265
  353.          Value           =   32768
  354.       End
  355.       Begin VB.Label Label11 
  356.          Alignment       =   2  'Center
  357.          AutoSize        =   -1  'True
  358.          BackColor       =   &H8000000B&
  359.          BackStyle       =   0  'Transparent
  360.          Caption         =   "Selec"
  361.          ForeColor       =   &H00000000&
  362.          Height          =   195
  363.          Left            =   360
  364.          TabIndex        =   25
  365.          Top             =   2040
  366.          Width           =   435
  367.       End
  368.    End
  369.    Begin VB.Frame Frame14 
  370.       Height          =   885
  371.       Left            =   0
  372.       TabIndex        =   26
  373.       Top             =   840
  374.       Width           =   2870
  375.       Begin VB.TextBox timeWindow 
  376.          Alignment       =   2  'Center
  377.          BackColor       =   &H80000008&
  378.          BeginProperty Font 
  379.             Name            =   "Arial"
  380.             Size            =   20.25
  381.             Charset         =   0
  382.             Weight          =   700
  383.             Underline       =   0   'False
  384.             Italic          =   0   'False
  385.             Strikethrough   =   0   'False
  386.          EndProperty
  387.          ForeColor       =   &H00FFFFFF&
  388.          Height          =   600
  389.          Left            =   60
  390.          Locked          =   -1  'True
  391.          TabIndex        =   27
  392.          TabStop         =   0   'False
  393.          Top             =   190
  394.          Width           =   2745
  395.       End
  396.    End
  397.    Begin VB.Frame Frame16 
  398.       Height          =   800
  399.       Left            =   0
  400.       TabIndex        =   28
  401.       Top             =   1800
  402.       Width           =   2865
  403.       Begin VB.TextBox CD 
  404.          Alignment       =   2  'Center
  405.          BackColor       =   &H00000000&
  406.          ForeColor       =   &H00FFFFFF&
  407.          Height          =   285
  408.          Left            =   60
  409.          Locked          =   -1  'True
  410.          TabIndex        =   33
  411.          TabStop         =   0   'False
  412.          Text            =   "Millenium CD Player"
  413.          Top             =   480
  414.          Width           =   2745
  415.       End
  416.       Begin VB.Label tracktime 
  417.          Alignment       =   2  'Center
  418.          BackColor       =   &H80000008&
  419.          BorderStyle     =   1  'Fixed Single
  420.          ForeColor       =   &H00FFFFFF&
  421.          Height          =   270
  422.          Left            =   60
  423.          TabIndex        =   29
  424.          Top             =   150
  425.          Width           =   2745
  426.       End
  427.    End
  428.    Begin VB.Frame Frame17 
  429.       Height          =   810
  430.       Left            =   0
  431.       TabIndex        =   30
  432.       Top             =   0
  433.       Width           =   2865
  434.       Begin VB.Label totalplay 
  435.          Alignment       =   2  'Center
  436.          BackColor       =   &H80000008&
  437.          BorderStyle     =   1  'Fixed Single
  438.          ForeColor       =   &H00FFFFFF&
  439.          Height          =   270
  440.          Left            =   60
  441.          TabIndex        =   32
  442.          Top             =   150
  443.          Width           =   2745
  444.       End
  445.       Begin VB.Label trtime 
  446.          Alignment       =   2  'Center
  447.          BackColor       =   &H80000008&
  448.          BorderStyle     =   1  'Fixed Single
  449.          ForeColor       =   &H00FFFFFF&
  450.          Height          =   270
  451.          Left            =   60
  452.          TabIndex        =   31
  453.          Top             =   480
  454.          Width           =   2745
  455.       End
  456.    End
  457.    Begin VB.Frame Frame1 
  458.       BackColor       =   &H80000004&
  459.       Caption         =   "Painel de Controle"
  460.       Height          =   2160
  461.       Left            =   2880
  462.       TabIndex        =   35
  463.       Top             =   2530
  464.       Width           =   3840
  465.       Begin Threed.SSCommand Command1 
  466.          Height          =   375
  467.          Left            =   2520
  468.          TabIndex        =   45
  469.          Top             =   1560
  470.          Width           =   1215
  471.          _Version        =   65536
  472.          _ExtentX        =   2143
  473.          _ExtentY        =   661
  474.          _StockProps     =   78
  475.          Caption         =   "Sair"
  476.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  477.             Name            =   "Verdana"
  478.             Size            =   8.25
  479.             Charset         =   0
  480.             Weight          =   700
  481.             Underline       =   0   'False
  482.             Italic          =   0   'False
  483.             Strikethrough   =   0   'False
  484.          EndProperty
  485.          BevelWidth      =   4
  486.       End
  487.       Begin Threed.SSCommand eject1 
  488.          Height          =   375
  489.          Left            =   1320
  490.          TabIndex        =   44
  491.          Top             =   1560
  492.          Width           =   1215
  493.          _Version        =   65536
  494.          _ExtentX        =   2143
  495.          _ExtentY        =   661
  496.          _StockProps     =   78
  497.          Caption         =   "Fechar CD"
  498.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  499.             Name            =   "Verdana"
  500.             Size            =   8.25
  501.             Charset         =   0
  502.             Weight          =   700
  503.             Underline       =   0   'False
  504.             Italic          =   0   'False
  505.             Strikethrough   =   0   'False
  506.          EndProperty
  507.          BevelWidth      =   4
  508.       End
  509.       Begin Threed.SSCommand eject0 
  510.          Height          =   375
  511.          Left            =   120
  512.          TabIndex        =   43
  513.          Top             =   1560
  514.          Width           =   1215
  515.          _Version        =   65536
  516.          _ExtentX        =   2143
  517.          _ExtentY        =   661
  518.          _StockProps     =   78
  519.          Caption         =   "Abrir CD"
  520.          ForeColor       =   4194304
  521.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  522.             Name            =   "Verdana"
  523.             Size            =   8.25
  524.             Charset         =   0
  525.             Weight          =   700
  526.             Underline       =   0   'False
  527.             Italic          =   0   'False
  528.             Strikethrough   =   0   'False
  529.          EndProperty
  530.          BevelWidth      =   4
  531.       End
  532.       Begin Threed.SSCommand ff 
  533.          Height          =   375
  534.          Left            =   2040
  535.          TabIndex        =   42
  536.          ToolTipText     =   "Avan
  537. ar dentro da Faixa"
  538.          Top             =   960
  539.          Width           =   735
  540.          _Version        =   65536
  541.          _ExtentX        =   1296
  542.          _ExtentY        =   661
  543.          _StockProps     =   78
  544.          BevelWidth      =   4
  545.          Picture         =   "Main.frx":08CA
  546.       End
  547.       Begin Threed.SSCommand rew 
  548.          Height          =   375
  549.          Left            =   3000
  550.          TabIndex        =   41
  551.          ToolTipText     =   "Recuar dentro da Faixa"
  552.          Top             =   960
  553.          Width           =   735
  554.          _Version        =   65536
  555.          _ExtentX        =   1296
  556.          _ExtentY        =   661
  557.          _StockProps     =   78
  558.          BevelWidth      =   4
  559.          Picture         =   "Main.frx":104C
  560.       End
  561.       Begin Threed.SSCommand btrack 
  562.          Height          =   375
  563.          Left            =   1080
  564.          TabIndex        =   40
  565.          ToolTipText     =   "Recuar Faixa"
  566.          Top             =   960
  567.          Width           =   735
  568.          _Version        =   65536
  569.          _ExtentX        =   1296
  570.          _ExtentY        =   661
  571.          _StockProps     =   78
  572.          BevelWidth      =   4
  573.          Picture         =   "Main.frx":17C7
  574.       End
  575.       Begin Threed.SSCommand ftrack 
  576.          Height          =   375
  577.          Left            =   120
  578.          TabIndex        =   39
  579.          ToolTipText     =   "Avan
  580. ar Faixa"
  581.          Top             =   960
  582.          Width           =   735
  583.          _Version        =   65536
  584.          _ExtentX        =   1296
  585.          _ExtentY        =   661
  586.          _StockProps     =   78
  587.          BevelWidth      =   4
  588.          Picture         =   "Main.frx":1EED
  589.       End
  590.       Begin Threed.SSCommand play 
  591.          Height          =   375
  592.          Left            =   360
  593.          TabIndex        =   36
  594.          ToolTipText     =   "Play"
  595.          Top             =   360
  596.          Width           =   855
  597.          _Version        =   65536
  598.          _ExtentX        =   1508
  599.          _ExtentY        =   661
  600.          _StockProps     =   78
  601.          ForeColor       =   8388608
  602.          BevelWidth      =   4
  603.          Picture         =   "Main.frx":2614
  604.       End
  605.       Begin Threed.SSCommand pause 
  606.          Height          =   375
  607.          Left            =   1440
  608.          TabIndex        =   37
  609.          ToolTipText     =   "Pause"
  610.          Top             =   360
  611.          Width           =   975
  612.          _Version        =   65536
  613.          _ExtentX        =   1720
  614.          _ExtentY        =   661
  615.          _StockProps     =   78
  616.          ForeColor       =   -2147483633
  617.          BevelWidth      =   4
  618.          Picture         =   "Main.frx":2A04
  619.       End
  620.       Begin Threed.SSCommand stopbtn 
  621.          Height          =   375
  622.          Left            =   2640
  623.          TabIndex        =   38
  624.          ToolTipText     =   "Stop"
  625.          Top             =   360
  626.          Width           =   855
  627.          _Version        =   65536
  628.          _ExtentX        =   1508
  629.          _ExtentY        =   661
  630.          _StockProps     =   78
  631.          BevelWidth      =   4
  632.          Picture         =   "Main.frx":316E
  633.       End
  634.    End
  635.    Begin VB.Menu mnusobre 
  636.       Caption         =   "&Menu"
  637.       Begin VB.Menu mnusobremillenium 
  638.          Caption         =   "Sobre"
  639.       End
  640.       Begin VB.Menu mnusair 
  641.          Caption         =   "&Sair"
  642.       End
  643.    End
  644. Attribute VB_Name = "Main"
  645. Attribute VB_GlobalNameSpace = False
  646. Attribute VB_Creatable = False
  647. Attribute VB_PredeclaredId = True
  648. Attribute VB_Exposed = False
  649. 'Millenium CD Player
  650. 'OFPG - Marketing e Publicidade, Lda - Brain Design Solutions
  651. 'http://www.braindesignsolutions.com
  652. 'softwaredirector@braindesignsolutions.com
  653. 'Agosto 2001
  654. 'Made in Portugal (UE)
  655. '-------------------------------------------
  656. Option Explicit
  657. Dim volR As Long
  658. Dim volL As Long
  659. Dim volume As Long
  660. Dim mute As MIXERCONTROL
  661. Dim unmute As MIXERCONTROL
  662. Dim hmixer As Long
  663. Dim VolCtrl As MIXERCONTROL
  664. Dim WavCtrl As MIXERCONTROL
  665. Dim CDVol As MIXERCONTROL
  666. Dim LineVol As MIXERCONTROL
  667. Dim MBOOST As MIXERCONTROL
  668. Dim PSPKVol As MIXERCONTROL
  669. Dim AUXVol As MIXERCONTROL
  670. Dim TADVol As MIXERCONTROL
  671. Dim MIDIVol As MIXERCONTROL
  672. Dim I25InVol As MIXERCONTROL
  673. Dim Treble As MIXERCONTROL
  674. Dim Bass As MIXERCONTROL
  675. Dim rc As Long
  676. Dim ok As Boolean
  677. Dim fastForwardSpeed As Long
  678. Dim fPlaying As Boolean
  679. Dim fCDLoaded As Boolean
  680. Dim numTracks As Integer
  681. Dim trackLength() As String
  682. Dim track As Integer
  683. Dim min As Integer
  684. Dim SEC As Integer
  685. Dim cmd As String
  686. Private Function SendMCIString(cmd As String, fShowError As Boolean) As Boolean
  687. Static rc As Long
  688. Static errStr As String * 200
  689. rc = mciSendString(cmd, 0, 0, hWnd)
  690. If (fShowError And rc <> 0) Then
  691.     mciGetErrorString rc, errStr, Len(errStr)
  692.     SendMCIString "close all", False
  693.     cmd = "close all"
  694.     SendMCIString cmd, True
  695.     Unload Main
  696. End If
  697. SendMCIString = (rc = 0)
  698. End Function
  699. Private Sub Check11_Click()
  700. If Check11.Value = 1 Then
  701. Check1.Value = 1
  702. Check2.Value = 1
  703. Check4.Value = 1
  704. End If
  705. If Check11.Value = 0 Then
  706. Check1.Value = 0
  707. Check2.Value = 0
  708. Check4.Value = 0
  709. End If
  710. End Sub
  711. Private Sub Command1_Click()
  712. SendMCIString "close all", False
  713. cmd = "close all"
  714. SendMCIString cmd, True
  715. 'Index.Enabled = True
  716. Unload Main
  717. End Sub
  718. Private Sub Command2_Click()
  719.     'Open the mixer with deviceID 0.
  720.     rc = mixerOpen(hmixer, 0, 0, 0, 0)
  721.     If ((MMSYSERR_NOERROR <> rc)) Then
  722.         MsgBox "N
  723.  poss
  724. vel abrir a mesa de mistura. Certifique que est
  725.  correctamente instalada."
  726.         Exit Sub
  727.     End If
  728.     ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_DST_SPEAKERS, _
  729.                                   MIXERCONTROL_CONTROLTYPE_VOLUME, VolCtrl)
  730.     If (ok = True) Then
  731.         volume = GetVolumeControlValue(hmixer, VolCtrl)
  732.         If volume <> -1 Then
  733.             txtMasterVolume.Text = volume \ 6553
  734.             sliderMasterVolume.Value = 65535 - volume
  735.         End If
  736.     End If
  737.     ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_SRC_WAVEDSVol, _
  738.                                   MIXERCONTROL_CONTROLTYPE_VOLUME, WavCtrl)
  739.         If (ok = True) Then
  740.         volume = GetVolumeControlValue(hmixer, WavCtrl)
  741.     End If
  742.     ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_SRC_MBOOST, _
  743.                                   MIXERCONTROL_CONTROLTYPE_VOLUME, MBOOST)
  744.         If (ok = True) Then
  745.         volume = GetVolumeControlValue(hmixer, MBOOST)
  746.         If volume <> -1 Then
  747.             Text2.Text = volume \ 6553
  748.             Slider2.Value = 65535 - volume
  749.         End If
  750.     End If
  751.     ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_SRC_CDVol, _
  752.                                   MIXERCONTROL_CONTROLTYPE_VOLUME, CDVol)
  753.         If (ok = True) Then
  754.         volume = GetVolumeControlValue(hmixer, CDVol)
  755.         If volume <> -1 Then
  756.             Text1.Text = volume \ 6553
  757.             Slider1.Value = 65535 - volume
  758.         End If
  759.     End If
  760.     ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_src_AUXVol, _
  761.                                   MIXERCONTROL_CONTROLTYPE_VOLUME, AUXVol)
  762.         If (ok = True) Then
  763.         volume = GetVolumeControlValue(hmixer, AUXVol)
  764.         If volume <> -1 Then
  765.         End If
  766.     End If
  767.     ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_SRC_TADVol, _
  768.                                   MIXERCONTROL_CONTROLTYPE_VOLUME, TADVol)
  769.         If (ok = True) Then
  770.         volume = GetVolumeControlValue(hmixer, TADVol)
  771.         If volume <> -1 Then
  772.          
  773.         End If
  774.     End If
  775.     ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_SRC_MIDIVol, _
  776.                                   MIXERCONTROL_CONTROLTYPE_VOLUME, MIDIVol)
  777.         If (ok = True) Then
  778.         volume = GetVolumeControlValue(hmixer, MIDIVol)
  779.         If volume <> -1 Then
  780.         End If
  781.     End If
  782.         ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_SRC_PSPKVol, _
  783.                                   MIXERCONTROL_CONTROLTYPE_VOLUME, PSPKVol)
  784.         If (ok = True) Then
  785.         volume = GetVolumeControlValue(hmixer, PSPKVol)
  786.         If volume <> -1 Then
  787.         End If
  788.     End If
  789.     ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_SRC_I25InVol, _
  790.                                   MIXERCONTROL_CONTROLTYPE_VOLUME, I25InVol)
  791.         If (ok = True) Then
  792.         volume = GetVolumeControlValue(hmixer, I25InVol)
  793.         If volume <> -1 Then
  794.         End If
  795.     End If
  796.     ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_SRC_LINEVol, _
  797.                                   MIXERCONTROL_CONTROLTYPE_VOLUME, LineVol)
  798.         If (ok = True) Then
  799.         volume = GetVolumeControlValue(hmixer, LineVol)
  800.         If volume <> -1 Then
  801.         End If
  802.     End If
  803.     ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_DST_SPEAKERS, _
  804.                                   MIXERCONTROL_CONTROLTYPE_BASS, Bass)
  805.         If (ok = True) Then
  806.         volume = GetVolumeControlValue(hmixer, Bass)
  807.         If volume <> -1 Then
  808.         End If
  809.     End If
  810.     ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_DST_SPEAKERS, _
  811.                                   MIXERCONTROL_CONTROLTYPE_TREBLE, Treble)
  812.         If (ok = True) Then
  813.         volume = GetVolumeControlValue(hmixer, Treble)
  814.         If volume <> -1 Then
  815.         End If
  816.     End If
  817. End Sub
  818. Private Sub Form_Load()
  819. ShockwaveFlash1.Movie = App.Path & "\walk.swf"
  820. If (App.PrevInstance = True) Then
  821.     End
  822. End If
  823. Timer1.Enabled = False
  824. fastForwardSpeed = 5
  825. fCDLoaded = False
  826. If (SendMCIString("open cdaudio alias cd wait shareable", True) = False) Then
  827.     timeWindow.Text = "Cd in use"
  828.     End
  829. End If
  830. SendMCIString "set cd time format tmsf wait", True
  831. Timer1.Enabled = True
  832. Command2_Click
  833. End Sub
  834. Private Sub Form_Unload(Cancel As Integer)
  835. SendMCIString "close all", False
  836. End Sub
  837. Private Sub mnusair_Click()
  838. End Sub
  839. Private Sub mnusobremillenium_Click()
  840. frmAbout.Show
  841. End Sub
  842. Private Sub Option1_Click()
  843. ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_DST_SPEAKERS, _
  844.                                   MIXERCONTROL_CONTROLTYPE_MUTE, mute)
  845. SetMuteControl hmixer, mute, 1
  846. End Sub
  847. Private Sub Option10_Click()
  848. ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_SRC_MIDIVol, _
  849.                                   MIXERCONTROL_CONTROLTYPE_MUTE, unmute)
  850. unSetMuteControl hmixer, unmute, 1
  851. End Sub
  852. Private Sub Option17_Click()
  853. ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_SRC_PSPKVol, _
  854.                                   MIXERCONTROL_CONTROLTYPE_MUTE, mute)
  855. SetMuteControl hmixer, mute, 1
  856. End Sub
  857. Private Sub Option18_Click()
  858. ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_SRC_PSPKVol, _
  859.                                   MIXERCONTROL_CONTROLTYPE_MUTE, unmute)
  860. unSetMuteControl hmixer, unmute, 1
  861. End Sub
  862. Private Sub Option19_Click()
  863. ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_SRC_I25InVol, _
  864.                                   MIXERCONTROL_CONTROLTYPE_MUTE, unmute)
  865. unSetMuteControl hmixer, unmute, 1
  866. End Sub
  867. Private Sub Option20_Click()
  868. ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_SRC_I25InVol, _
  869.                                   MIXERCONTROL_CONTROLTYPE_MUTE, mute)
  870. SetMuteControl hmixer, mute, 1
  871. End Sub
  872. Private Sub Option9_Click()
  873. ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_SRC_MIDIVol, _
  874.                                   MIXERCONTROL_CONTROLTYPE_MUTE, mute)
  875. SetMuteControl hmixer, mute, 1
  876. End Sub
  877. Private Sub Option11_Click()
  878. ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_SRC_TADVol, _
  879.                                   MIXERCONTROL_CONTROLTYPE_MUTE, unmute)
  880. unSetMuteControl hmixer, unmute, 1
  881. End Sub
  882. Private Sub Option12_Click()
  883. ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_SRC_TADVol, _
  884.                                   MIXERCONTROL_CONTROLTYPE_MUTE, mute)
  885. SetMuteControl hmixer, mute, 1
  886. End Sub
  887. Private Sub Option13_Click()
  888. ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_SRC_CDVol, _
  889.                                   MIXERCONTROL_CONTROLTYPE_MUTE, unmute)
  890. unSetMuteControl hmixer, unmute, 1
  891. End Sub
  892. Private Sub Option14_Click()
  893. ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_SRC_CDVol, _
  894.                                   MIXERCONTROL_CONTROLTYPE_MUTE, mute)
  895. SetMuteControl hmixer, mute, 1
  896. End Sub
  897. Private Sub Option15_Click()
  898. ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_src_AUXVol, _
  899.                                   MIXERCONTROL_CONTROLTYPE_MUTE, mute)
  900. SetMuteControl hmixer, mute, 1
  901. End Sub
  902. Private Sub Option16_Click()
  903. ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_src_AUXVol, _
  904.                                   MIXERCONTROL_CONTROLTYPE_MUTE, unmute)
  905. unSetMuteControl hmixer, unmute, 1
  906. End Sub
  907. Private Sub Option2_Click()
  908. ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_DST_SPEAKERS, _
  909.                                   MIXERCONTROL_CONTROLTYPE_MUTE, unmute)
  910. unSetMuteControl hmixer, unmute, 1
  911. End Sub
  912. Private Sub Option3_Click()
  913. ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_SRC_WAVEDSVol, _
  914.                                   MIXERCONTROL_CONTROLTYPE_MUTE, mute)
  915. SetMuteControl hmixer, mute, 1
  916. End Sub
  917. Private Sub Option4_Click()
  918. ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_SRC_WAVEDSVol, _
  919.                                   MIXERCONTROL_CONTROLTYPE_MUTE, mute)
  920. unSetMuteControl hmixer, mute, 1
  921. End Sub
  922. Private Sub Option5_Click()
  923. ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_SRC_LINEVol, _
  924.                                   MIXERCONTROL_CONTROLTYPE_MUTE, mute)
  925. SetMuteControl hmixer, mute, 1
  926. End Sub
  927. Private Sub Option6_Click()
  928. ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_SRC_LINEVol, _
  929.                                   MIXERCONTROL_CONTROLTYPE_MUTE, unmute)
  930. unSetMuteControl hmixer, unmute, 1
  931. End Sub
  932. Private Sub Option7_Click()
  933. ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_SRC_MBOOST, _
  934.                                   MIXERCONTROL_CONTROLTYPE_MUTE, unmute)
  935. unSetMuteControl hmixer, unmute, 1
  936. End Sub
  937. Private Sub Option8_Click()
  938. ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_SRC_MBOOST, _
  939.                                   MIXERCONTROL_CONTROLTYPE_MUTE, mute)
  940. SetMuteControl hmixer, mute, 1
  941. End Sub
  942. Function Errora()
  943.     MsgBox "Your sound card does not support a bass control"
  944. End Function
  945. Private Sub ShockwaveFlash1_FSCommand(ByVal command As String, ByVal args As String)
  946.     Select Case command
  947.     End Select
  948. End Sub
  949. Private Sub Slider19_Scroll()
  950.     volL = CLng(32767.5 - Slider19)
  951.     volR = CLng(32767.5 + Slider19)
  952.     SetPANControl hmixer, VolCtrl, volL, volR
  953. End Sub
  954. Private Sub trebleslider_Scroll()
  955.       ok = GetMixerControl(hmixer, MIXERLINE_COMPONENTTYPE_DST_SPEAKERS, _
  956.                                   MIXERCONTROL_CONTROLTYPE_TREBLE, Treble)
  957.     If ok = False Then
  958.     Errora
  959.     Exit Sub
  960.     End If
  961.     SetVolumeControl hmixer, Treble, volume
  962. End Sub
  963. Private Sub BassSlider_Scroll()
  964.     SetVolumeControl hmixer, Bass, volume
  965. End Sub
  966. Private Sub Play_Click()
  967. SendMCIString "play cd", True
  968. fPlaying = True
  969. CD.Text = "A Reproduzir"
  970. End Sub
  971. Private Sub Slider6_scroll()
  972. Dim link As Long
  973. link = 65535 - CLng(Slider6.Value)
  974. If Check2.Value = 1 Then
  975. Slider1.Value = Slider6.Value
  976. Text1.Text = link \ 6553
  977. SetVolumeControl hmixer, CDVol, link
  978. End If
  979. If Check4.Value = 1 Then
  980. Slider2.Value = Slider6.Value
  981. Text2.Text = link \ 6553
  982. SetVolumeControl hmixer, MBOOST, link
  983. End If
  984. If Check1.Value = 1 Then
  985. sliderMasterVolume.Value = Slider6.Value
  986. txtMasterVolume.Text = link \ 6553
  987. SetVolumeControl hmixer, VolCtrl, link
  988. End If
  989. End Sub
  990. Private Sub SSCommand1_Click()
  991. End Sub
  992. Private Sub stopbtn_Click()
  993. SendMCIString "stop cd wait", True
  994. cmd = "seek cd to " & track
  995. SendMCIString cmd, True
  996. fPlaying = False
  997. CD.Text = "CD Parado"
  998. Update
  999. End Sub
  1000. Private Sub pause_Click()
  1001. SendMCIString "pause cd", True
  1002. fPlaying = False
  1003. CD.Text = "Cd em Pausa"
  1004. Update
  1005. End Sub
  1006. Private Sub Eject0_Click()
  1007. SendMCIString "set cd door open", True
  1008. CD.Text = "Insira CD"
  1009. eject1.Visible = True
  1010. eject0.Visible = False
  1011. Update
  1012. End Sub
  1013. Private Sub Eject1_Click()
  1014. CD.Text = "Aguarde Por Favor"
  1015. SendMCIString "set cd door closed", True
  1016. eject0.Visible = True
  1017. eject1.Visible = False
  1018. Update
  1019. End Sub
  1020. Private Sub ff_Click()
  1021. Dim s As String * 40
  1022. SendMCIString "set cd time format milliseconds", True
  1023. mciSendString "status cd position wait", s, Len(s), 0
  1024. If (fPlaying) Then
  1025.     cmd = "play cd from " & CStr(CLng(s) + fastForwardSpeed * 1000)
  1026.     cmd = "seek cd to " & CStr(CLng(s) + fastForwardSpeed * 1000)
  1027. End If
  1028. mciSendString cmd, 0, 0, 0
  1029. SendMCIString "set cd time format tmsf", True
  1030. Update
  1031. End Sub
  1032. Private Sub rew_Click()
  1033. Dim s As String * 40
  1034. SendMCIString "set cd time format milliseconds", True
  1035. mciSendString "status cd position wait", s, Len(s), 0
  1036. If (fPlaying) Then
  1037.     cmd = "play cd from " & CStr(CLng(s) - fastForwardSpeed * 1000)
  1038.     cmd = "seek cd to " & CStr(CLng(s) - fastForwardSpeed * 1000)
  1039. End If
  1040. mciSendString cmd, 0, 0, 0
  1041. SendMCIString "set cd time format tmsf", True
  1042. Update
  1043. End Sub
  1044. Private Sub ftrack_Click()
  1045. If (track < numTracks) Then
  1046.     If (fPlaying) Then
  1047.         cmd = "play cd from " & track + 1
  1048.         SendMCIString cmd, True
  1049.     Else
  1050.         cmd = "seek cd to " & track + 1
  1051.         SendMCIString cmd, True
  1052.     End If
  1053.     SendMCIString "seek cd to 1", True
  1054. End If
  1055. Update
  1056. End Sub
  1057. Private Sub btrack_Click()
  1058. Dim from As String
  1059. If (min = 0 And SEC = 0) Then
  1060.     If (track > 1) Then
  1061.         from = CStr(track - 1)
  1062.     Else
  1063.         from = CStr(numTracks)
  1064.     End If
  1065.     from = CStr(track)
  1066. End If
  1067. If (fPlaying) Then
  1068.     cmd = "play cd from " & from
  1069.     SendMCIString cmd, True
  1070.     cmd = "seek cd to " & from
  1071.     SendMCIString cmd, True
  1072. End If
  1073. Update
  1074. End Sub
  1075. Private Sub Update()
  1076. Static s As String * 30
  1077. mciSendString "status cd media present", s, Len(s), 0
  1078. If (CBool(s)) Then
  1079.     If (fCDLoaded = False) Then
  1080.         mciSendString "status cd number of tracks wait", s, Len(s), 0
  1081.         numTracks = CInt(Mid$(s, 1, 2))
  1082.         eject0.Visible = True
  1083.         eject1.Visible = False
  1084.         CD.Text = "CD Pronto"
  1085.         If (numTracks = 1) Then
  1086.             CD.Text = "Formato Inv
  1087. lido"
  1088.             Exit Sub
  1089.         End If
  1090.         
  1091.         mciSendString "status cd length wait", s, Len(s), 0
  1092.         totalplay.Caption = "Faixas: " & numTracks
  1093.         trtime.Caption = "Tempo Total: " & s
  1094.         ReDim trackLength(1 To numTracks)
  1095.         Dim i As Integer
  1096.         For i = 1 To numTracks
  1097.             cmd = "status cd length track " & i
  1098.             mciSendString cmd, s, Len(s), 0
  1099.             trackLength(i) = s
  1100.         Next
  1101.         timeWindow.FontSize = 18
  1102.         play.Enabled = True
  1103.         pause.Enabled = True
  1104.         ff.Enabled = True
  1105.         rew.Enabled = True
  1106.         ftrack.Enabled = True
  1107.         btrack.Enabled = True
  1108.         stopbtn.Enabled = True
  1109.         fCDLoaded = True
  1110.         SendMCIString "seek cd to 1", True
  1111.     End If
  1112.     mciSendString "status cd position", s, Len(s), 0
  1113.     track = CInt(Mid$(s, 1, 2))
  1114.     min = CInt(Mid$(s, 4, 2))
  1115.     SEC = CInt(Mid$(s, 7, 2))
  1116.     timeWindow.Text = "[" & Format(track, "00") & "] " & Format(min, "00") _
  1117.             & ":" & Format(SEC, "00")
  1118.     tracktime.Caption = "Tempo Faixa: " & trackLength(track)
  1119.     mciSendString "status cd mode", s, Len(s), 0
  1120.     fPlaying = (Mid$(s, 1, 7) = "playing")
  1121.     If (fCDLoaded = True) Then
  1122.         play.Enabled = False
  1123.         pause.Enabled = False
  1124.         ff.Enabled = False
  1125.         rew.Enabled = False
  1126.         ftrack.Enabled = False
  1127.         btrack.Enabled = False
  1128.         stopbtn.Enabled = False
  1129.         fCDLoaded = False
  1130.         fPlaying = False
  1131.         totalplay.Caption = ""
  1132.         tracktime.Caption = ""
  1133.         CD.Text = "N
  1134. o existe CD no Leitor"
  1135.     End If
  1136. End If
  1137. End Sub
  1138. Private Sub Timer1_Timer()
  1139. Update
  1140. End Sub
  1141. Private Sub Slider1_Scroll()
  1142.     volume = 65535 - CLng(Slider1.Value)
  1143.     Text1.Text = volume \ 6553
  1144.     SetVolumeControl hmixer, CDVol, volume
  1145. End Sub
  1146. Private Sub Slider2_Scroll()
  1147.     volume = 65535 - CLng(Slider2.Value)
  1148.     Text2.Text = volume \ 6553
  1149.     SetVolumeControl hmixer, MBOOST, volume
  1150. End Sub
  1151. Private Sub Slider3_Scroll()
  1152.     SetVolumeControl hmixer, AUXVol, volume
  1153. End Sub
  1154. Private Sub Slider4_Scroll()
  1155.     SetVolumeControl hmixer, TADVol, volume
  1156. End Sub
  1157. Private Sub Slider5_Scroll()
  1158.     SetVolumeControl hmixer, MIDIVol, volume
  1159. End Sub
  1160. Private Sub Slider7_Scroll()
  1161.     SetVolumeControl hmixer, PSPKVol, volume
  1162. End Sub
  1163. Private Sub Slider8_Scroll()
  1164.     SetVolumeControl hmixer, I25InVol, volume
  1165. End Sub
  1166. Private Sub Slider9_Scroll()
  1167.     SetVolumeControl hmixer, LineVol, volume
  1168. End Sub
  1169. Private Sub sliderMasterVolume_Scroll()
  1170.     volume = 65535 - CLng(sliderMasterVolume.Value)
  1171.     txtMasterVolume.Text = volume \ 6553
  1172.     SetVolumeControl hmixer, VolCtrl, volume
  1173. End Sub
  1174. Private Sub sliderWaveOutVolume_Scroll()
  1175.     SetVolumeControl hmixer, WavCtrl, volume
  1176. End Sub
  1177.